<div dojoType="dojox.data.XmlStore" jsId="store" url="/default/xml/menu" label="name"
     attributeMap="{'url': '@url', 'name': '@name', 'bookmark': '@bookmark', 'disabled': '@disabled', 'target': '@target'}" />
        
<div dojoType="dijit.tree.ForestStoreModel" jsId="model" store="store" query="{}" childrenAttrs="childNodes" />

<div dojoType="dijit.Tree" id="menu" model="model"  showRoot="false">
    <script type="dojo/method" event="onLoad" args="item">
        return store.isItem(item) ? store.getValue(item, "disabled") : "";
    </script>
    <script type="dojo/method" event="onClick" args="item">
        if (store.getValue(item,"disabled") == "enabled") {
            target = store.getValue(item,"target");
            parent.frames[target].location.href = store.getValue(item,"url");
        }
    </script>  
    <script type="dojo/method" event="getLabelClass" args="item, opened">
        return store.isItem(item) ? store.getValue(item, "disabled") : "";
    </script>
    <script type="dojo/method" event="getIconClass" args="item, opened">
        if (store.isItem(item)) {
            return  store.getValue(item, "url") 
                        ? store.getValue(item, "disabled") + "Node " + store.getValue(item, "bookmark")
                        : "branch" + (opened ? "Opened" : "Closed"); 
        }
    </script>      
</div>
        
<style type="text/css">
    .branchOpened { background-image: url(../../css/icon/menu/branchOpened.png); width: 24px; height: 24px; }
    .branchClosed { background-image: url(../../css/icon/menu/branchClosed.png); width: 24px; height: 24px; }
    .disabledNode { background-image: url(../../css/icon/menu/disabledNode.png); width: 22px; height: 22px; }
    .enabledNode{ background-image: url(../../css/icon/menu/enabledNode.png); width: 22px; height: 22px; }
    .bookmark{ background-image: url(../../css/icon/menu/bookmark.png); width: 22px; height: 22px; }
    .disabled { color: #808080; }
</style>